package com.example.questionnairespringboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.questionnairespringboot.entity.User;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/*@Mapper*/
public interface UserMapper extends BaseMapper<User> {

/*    @Select("SELECT * from user")
    List<User> findAll();

    @Insert("Insert into user(username,password) Values (#{username},#{password})")
    int insert(User user);

    int update(User user);

    @Delete("delete from user where id = #{id}")
    Integer deleteById(Integer id);

    @Select("select * from user where username like concat('%',#{username},'%') limit #{pageNum},#{pageSize}")
    List<User> selectPage(Integer pageNum, Integer pageSize,String username);

    @Select("select  count(*) from user where username like concat('%',#{username},'%')")
    Integer selectTotal(String username);*/
}
